#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
  @Time     : 2024/4/20 15:23
  @Author   : MingTai
  @File     : numpy_demo.py
  @Desc     : Desc
"""
import numpy as np


def nn1():
    # aa = numpy.array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0)
    # 一维数组 di
    aa = np.array([1, 2, 3])
    print(aa)
    print(aa.dtype)
    print(aa.shape)

    # 创建二维数组
    aa1 = np.array([[1, 2, 3], [1, 2, 3]])
    print(aa1)


# 遍历
def nn2():
    aa3 = np.arange(0, 60, 5)
    print(aa3)
    for x in np.nditer(aa3):
        print(x)


if __name__ == '__main__':
    nn2()
